/**
 * 功能描述 列表
 */

define(function (require, exports, module){
	var EditGrid = require("editgrid");
	var enmu=require("enums");
	
	var instance = {
		initComponent:function (params,widget){
			var settleEditGridOne = new EditGrid({
				parentNode:".J-detailForm",
				autoRender : false,
				model:{
					id:"settleEditGridOne",
					isInitPageBar: false,
					allowAdd: false,
					columns:[{
						name : "project",
						label : "项目"
					},{
						name:"money",
						label:"金额",
						format:function(value,data){
							if(data.disabled){
								return "<span id='"+data.key+"'>"+value+"</span>";
							}else{
								return "<input id='"+data.key+"' class='form-control' type='text' value='"+value+"'/>";
							}
						},
					},/*{
						name:"description",
						label:"备注",
					},*/{
						 name:"operate",
						 label:"操作",
						 format:"button",
						 formatparams:[{
							id:"detail",
							text: "详情",
							show: function(index, data){
								if(data.showOperate){
									return true;
								}else{
									return false
								}
							},
							handler:function(index,data,rowEle){
								widget.detailHandler.showDetail(widget,data);
							}
						 }]
					 }]
				}
			});
			widget.set("settleEditGridOne",settleEditGridOne);
		}
	};
	module.exports = instance;
});
